<template>
  <div class="cardBox">
    <a-row :gutter="4">
      <a-col  :xl="4" :lg="12" :md="12" sm="24">
        <Card
          title="订单总数"
          icon="profile"
          :desc="cardData.count"
          unit="笔"
          @handleDetail="handleDetail"
        />
      </a-col>
      <a-col  :xl="4" :lg="12" :md="12" sm="24">
        <Card
          title="订单总金额"
          icon="money-collect"
          :desc="cardData.money"
          @handleDetail="handleDetail"
          unit="元"
        />
      </a-col>
      <a-col  :xl="4" :lg="12" :md="12" sm="24">
          <Card
          title="总佣金"
          icon="pay-circle"
          :desc="cardData.commissionAmt"
          @handleDetail="handleDetail"
          unit="元"
        />
      </a-col>
      <a-col  :xl="4" :lg="12" :md="12" sm="24">
          <Card
          title="未提现佣金"
          icon="pay-circle"
          :desc="cardData.notCashOutAmt"
          unit="元"
        />
      </a-col>
      <a-col  :xl="4" :lg="12" :md="12" sm="24">
          <Card
          title="已提现佣金"
          icon="pay-circle"
          :desc="cardData.cashOutAmt"
          unit="元"
        />
      </a-col>
      <a-col  :xl="4" :lg="12" :md="12" sm="24">
        <Card
          title="会员总数"
          icon="solution"
          :desc="cardData.member"
          @handleDetail="handleMem"
          unit="个"
        />
      </a-col>
    </a-row>
  </div>
</template>

<script>
import Card from "./Card.vue";
export default {
  name: "cardBox",
  props: {
    cardData: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  components: {
    Card,
  },
  data() {
    return {
    //   cardData: {
    //     dingDan: 333,
    //     money: 2222,
    //     yongjin: 888,
    //     member: 12523,
    //     jieqing: 223,
    //     weijieqing: 222,
    //   },
    };
  },
  methods:{
    handleDetail(){
      this.$router.push("/basic/customer")
    },
    handleRecord(){
      this.$router.push("/basic/Warehouse")
    },
    handleMem(){
      this.$router.push("/basic/memberList")
    }
  }
};
</script>
<style lang="less" scoped>
.cardBox {
  margin: 10px 20px;
}
</style>